/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author taticay
 */
@Entity
@Table(name = "w_claim_item")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "WClaimItem.findAll", query = "SELECT w FROM WClaimItem w"),
    @NamedQuery(name = "WClaimItem.findByIdClaimItem", query = "SELECT w FROM WClaimItem w WHERE w.idClaimItem = :idClaimItem"),
    @NamedQuery(name = "WClaimItem.findByDescription", query = "SELECT w FROM WClaimItem w WHERE w.description = :description"),
    @NamedQuery(name = "WClaimItem.findByIsGear", query = "SELECT w FROM WClaimItem w WHERE w.isGear = :isGear")})
public class WClaimItem implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_claim_item")
    private Integer idClaimItem;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 30)
    @Column(name = "description")
    private String description;
    @Basic(optional = false)
    @NotNull
    @Column(name = "is_gear")
    private int isGear;

   
    public WClaimItem() {
    }

    public WClaimItem(Integer idClaimItem) {
        this.idClaimItem = idClaimItem;
    }

    public WClaimItem(Integer idClaimItem, String description, int isGear) {
        this.idClaimItem = idClaimItem;
        this.description = description;
        this.isGear=isGear;
    }

    public Integer getIdClaimItem() {
        return idClaimItem;
    }

    public void setIdClaimItem(Integer idClaimItem) {
        this.idClaimItem = idClaimItem;
    }

    public String getDescription() {
        return description;
    }

     public int isIsGear() {
        return isGear;
    }

    public void setIsGear(int isGear) {
        this.isGear = isGear;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idClaimItem != null ? idClaimItem.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof WClaimItem)) {
            return false;
        }
        WClaimItem other = (WClaimItem) object;
        if ((this.idClaimItem == null && other.idClaimItem != null) || (this.idClaimItem != null && !this.idClaimItem.equals(other.idClaimItem))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.giant.entities.WClaimItem[ idClaimItem=" + idClaimItem + " ]";
    }
    
}
